<template>
	<div class="one">
		<h1>one</h1>
		<p @click="set">{{ getTxt }}</p>
	</div>
</template>

<script>
import {mapGetters, mapMutations} from 'vuex';

export default {
	name: 'one',
	// props: ['val'],
	data() {
		return {}
	},
	computed: {
		...mapGetters({
			getTxt: 'getTxt'
		})
	},
	methods: {
		...mapMutations({
			setVal: 'setVal'
		}),
		set() {
			this.setVal('邪王真眼是最强的！');
		}
	}
}
</script>

<style lang="scss">
.one {
  width: 360px;
  height: 360px;
  text-align: center;
  display: inline-flex;
  background-color: #60609c;
  color: #fff;
  font: 700 22px 微软雅黑;
}
</style>